
// pages/newCart/components/cart-pay/index.js
Component({

  /**
   * 组件的属性列表
   */
  properties: {
    totalPrice: {
      type: String,
      value: '0.00'
    },
    selected: {
      type: Boolean,
      value: false
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    // selected: false
  },

  /**
   * 组件的方法列表
   */
  methods: {
    checkboxClick(e) {      
      this.setData({
        selected: !this.data.selected
      }, () => {
        this.triggerEvent('updateAllSelect', this.data.selected)
      })
    },
    toPay() {
      this.triggerEvent('topay', null)
    }
  }
})